package com.zhdl.modules.demo.task;

import com.zhdl.hardware.plc.siemens.repository.impl.SiemensPortCmdHandleDaoImpl;
import com.zhdl.hardware.plc.siemens.service.SiemensCmdSendService;
import com.zhdl.modules.puncturecable.service.PunctureCableService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: zhangyy
 * @Email: zhang10092009@hotmail.com
 * @Date: 2023/7/13 15:26:06
 * @Version: v1.0
 * @Modified: 启动后执行的服务
 * @Description:
 */
@Slf4j
@Service
public class RunService implements ApplicationRunner {

//    @Resource
//    private SiemensPortCmdHandleDaoImpl siemensPortCmdHandleDao;
//
//
//    @Resource
//    private SiemensCmdSendService siemensCmdSendService;
//
//    String plcPort = "192.168.0.1:502";


    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("启动后执行的方法 =========>");
//        siemensPortCmdHandleDao.addPort("192.168.0.1:502");
//        siemensCmdSendService.siemensAddressValue(plcPort, "0000", 122, 200, s -> {
//            log.info("plcValue--------->" + s);
//        });
    }
}
